<include file="Public:header"/>
 <script type="text/javascript" charset="utf-8">window.UEDITOR_HOME_URL= "__PUBLIC__/ueditor/";</script>
 <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/editor_config.js"></script>
 <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/editor_all.js"></script>

<form id="goods" method="POST" action="__URL__/add_global" enctype="multipart/form-data">
<div class="cat" style="margin:0 auto;margin-top:10px;width:1000px;">
<table border="0" width="100%">
	<tr>
		<td align="right">变量：</td>
		<td align="left"><input type="text" name="global_key" size="20"><span id="ck" style="color:#FF0000;font-weight:bold">(必填)格式：{TAG:大写字母/数字}</span></td>
	</tr>
	<tr>
		<td align="right">名称：</td>
		<td align="left"><input type="text" name="global_name" size="20"></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td align="left"><input type="text" name="note" size="20"></td>
	</tr>
	<tr>
		<td align="right">变量值：</td>
		<td align="left"><textarea id="contents" name="contents"></textarea></td>
	</tr>
</table>
</div>
<br><br>
<div id="save" style="border:1px solid #DFDFDF;background-color:#DFDFDF;padding:5px;height:20px"><input type="submit" value="添加全局变量"></div>
</form>


<script>
$(function(){
   $("[name=global_key]").blur(function(){
        var key=$(this).val();
		$.ajax({
		     type:"POST",
			 url:"__URL__/ck_key",
			 dataType:"html",
			 data:{'global_key':key},
			 success:function(data){
			     $("#ck").html(data);
			 }
		})
   })
 

})
</script>
</body>
<SCRIPT type="text/javascript">  
    var editor = new UE.ui.Editor({
    initialFrameHeight:240
	,initialFrameWidth:850
}); 
    editor.render("contents");  
</SCRIPT>
</html>